Repository navigation
Conversation
There was a problem hiding this comment.
One question that I'm not sure applies to any of the current diff - testing an update with evacuation on on main, all the instances that were stopped for evacuation ended up stuck in "Rebooting", as far as the external API was reporting. Internally they were in the sled_evacuating state, but they also couldn't be stopped - I got a 500 any time I tried, and the internal log was instance is active but not resident on a sled. That's coming from this:
omicron/nexus/src/app/instance.rs
Lines 1342 to 1352 in d455830
Can/should that match be updated to allow explicitly stopping an instance that's in the sled_evacuating state but that hasn't been reincarnated yet?
EDIT: #11639 does this (it's doable on main separately from this PR's changes)
| } | ||
|
|
||
| if let Err(error) = self | ||
| .reincarnate_all( |
There was a problem hiding this comment.
Does reincarnate_all need to remember why we're reincarnating it? It will kick off start sagas for these instances, but if that saga unwinds, it puts the instance back onto the NoVmm state unconditionally:
omicron/nexus/src/app/sagas/instance_start.rs
Line 505 in d455830
I guess that means the real question is whether the instance start saga needs to be told what state to restore if it has to undo?
There was a problem hiding this comment.
Yes, I think the ReincarnationReason needs to be passed into the saga. There are a couple other reasons this is necessary:
- As I discussed in https://github.com/oxidecomputer/omicron/pull/11504/changes#r4427704695, we probably don't want to set the
time_last_auto_restartedtimestamp when theinstance-startsaga completes, since that will be used to calculate the cooldown, and we don't want reincarnations due to sled evacuation to "count against" the instance's auto-restart cooldown (since they are not the VM's "fault"). That will require us to thread it all the way through to the saga. - It's probably nice for the saga's logs and stuff to be able to distinguish between sagas that are restarting a failed instance and those that are restarting an evacuated one, for debugging purposes. There's a
Reasonenum in theinstance_startsaga that's included in the saga's log messages, and it would be nice if that distinguished between evacuation and failure. - Determining the state to put the instance back into if the saga unwinds, as @jgallagher mentioned.
There was a problem hiding this comment.
Should we skip the cooldown period for VMMs being reincarnated due to evacuation? We don't know how many times any given instance will suffer reincarnation due to evacuation (worst case is "num sleds" times, I guess?), and it doesn't seem like that should induce a cooldown unless the instance is somehow at fault for the reincarnation failing.
There was a problem hiding this comment.
Yeah, the cooldown period is only intended to apply to instances that failed. I think we should not count it against evacuated VMMs.
We probably also don't want to change the value of time_last_auto_restarted when we are an restarting an evacuated VMM, because that's how we calculate whether the cooldown has elapsed. I think we probably only want restarts that are due to a failure to set that timestamp, because otherwise, if the VMM is restarted due to an evacuation and then fails, we will count the evacuation against it when determining if the cooldown has elapsed.
There was a problem hiding this comment.
Didn't get to this bit yet, will finish tomorrow!
Sorry, I didn't mean to click "approve" — there's a lot more here I want to read through, and I agree with John's comments about making evacuating instances stoppable.
…ion (#11639) This allows users to stop an instance that appears stuck in rebooting but is actually stopped for sled evacuation and waiting to be reincarnated, as described in #11504 (review).
There was a problem hiding this comment.
Yeah, the cooldown period is only intended to apply to instances that failed. I think we should not count it against evacuated VMMs.
We probably also don't want to change the value of time_last_auto_restarted when we are an restarting an evacuated VMM, because that's how we calculate whether the cooldown has elapsed. I think we probably only want restarts that are due to a failure to set that timestamp, because otherwise, if the VMM is restarted due to an evacuation and then fails, we will count the evacuation against it when determining if the cooldown has elapsed.
There was a problem hiding this comment.
I think this all needs to be ORed with the dsl::state.eq(InstanceState::SledEvacuating), so that the auto-restart cooldown doesn't apply to evacuated instances.
I think the nicest way to do that might be to rewrite the whole query so that there is a separate predicate for failed instances and evacuated instances which get ORed together, and then ANDed with the stuff that applies everywhere ("intended state is running, not deleted, etc). Something like this:
// Query fragment for selecting *failed* instances that are eligible to
// restart
let can_restart_from_failure = (dsl::auto_restart_policy
.eq(InstanceAutoRestartPolicy::BestEffort)
// If the auto-restart policy is null, then it should
// default to "best effort".
.or(dsl::auto_restart_policy.is_null()))
// An instance whose last reincarnation was within the cooldown
// from now must remain in _bardo_ --- the liminal state between
// death and rebirth --- before its next reincarnation.
.and(
// If the instance has never previously been reincarnated, then
// it's allowed to reincarnate.
dsl::time_last_auto_restarted
.is_null()
// Or, if it has an overridden cooldown period, has that
// elapsed?
.or(dsl::auto_restart_cooldown.is_not_null().and(
dsl::time_last_auto_restarted
.le(now.nullable() - dsl::auto_restart_cooldown),
))
// Or, finally, if it does not have an overridden cooldown
// period, has the default cooldown period elapsed?
.or(dsl::auto_restart_cooldown.is_null().and(
dsl::time_last_auto_restarted
.le((now - Self::DEFAULT_COOLDOWN).nullable()),
)),
);
// An instance should only be automatically restarted if it is intended
// to be in the `Running` state. Instances which were requested to stop
// should not be automatically restarted, even if they have failed.
dsl::intended_state.eq(IntendedState::Running)
// Either the failed-instance preduicate from above matches, *or*
// the instance is rebooting due to its sled evacuating. When an
// instance had to stop for sled evacuation, can always be
// reincarnated, regardless of its auto-restart policy and when it
// last reincarnated.
.and(
can_restart_from_failure
.or(dsl::state.eq(InstanceState::SledEvacuating))
)
// Deleted instances may not be reincarnated.
.and(dsl::time_deleted.is_null())
// If the instance is currently in the process of being updated,
// let's not mess with it for now and try to restart it on another
// pass.
.and(dsl::updater_id.is_null())(note that this is all kind of just a sketch and it...might not even compile)
| } | ||
|
|
||
| if let Err(error) = self | ||
| .reincarnate_all( |
There was a problem hiding this comment.
Yes, I think the ReincarnationReason needs to be passed into the saga. There are a couple other reasons this is necessary:
- As I discussed in https://github.com/oxidecomputer/omicron/pull/11504/changes#r4427704695, we probably don't want to set the
time_last_auto_restartedtimestamp when theinstance-startsaga completes, since that will be used to calculate the cooldown, and we don't want reincarnations due to sled evacuation to "count against" the instance's auto-restart cooldown (since they are not the VM's "fault"). That will require us to thread it all the way through to the saga. - It's probably nice for the saga's logs and stuff to be able to distinguish between sagas that are restarting a failed instance and those that are restarting an evacuated one, for debugging purposes. There's a
Reasonenum in theinstance_startsaga that's included in the saga's log messages, and it would be nice if that distinguished between evacuation and failure. - Determining the state to put the instance back into if the saga unwinds, as @jgallagher mentioned.
|
Thanks for working on #11639 @jgallagher! I have just one concern. What happens if the user stops a rebooting sled after the saga started? There's still a chance the instance is stuck in rebooting no? |
I think that already has to work, right? A user request to stop could come in concurrently with an instance update saga running in other circumstances, and if that doesn't work in this case, it probably is a preexisting bug? All the state changes are guarded by generation numbers, so if we're at generation N and a user stop request comes in concurrently with the saga running to restart the instance, I'd expect either:
Is there a specific sequence you're worried about that ends with the instance stuck in rebooting? |
@jgallagher: So I looked deeper into this (with ai help) and it appears to be that there is a small window where this could happen. Let's say the VMM stopper task runs, and stops a VMM. Then, as Propolis shuts down, sled agent reports when the state changes. Once it reports the VMM is omicron/nexus/src/app/sagas/instance_update/mod.rs Lines 423 to 430 in 08b9e31 During the omicron/nexus/src/app/sagas/instance_update/start.rs Lines 329 to 332 in 40b22e5 The saga then passes that data to omicron/nexus/src/app/sagas/instance_update/mod.rs Lines 754 to 766 in 08b9e31 After that the
omicron/nexus/src/app/sagas/instance_update/mod.rs Lines 941 to 974 in 08b9e31 If the instance were to be stopped in the window between when the snapshot is taken and the information committed, the following would happen:
omicron/nexus/src/app/instance.rs Lines 1153 to 1164 in 08b9e31 At this point the omicron/sled-agent/src/sled_agent.rs Lines 279 to 282 in 08b9e31 Now, Then, the previous in-flight saga commits the information snapshot it took before the user requested to stop the instance, it does not contain a new intended state, so it keeps The instance would be stuck in a |
karencfv
left a comment
There was a problem hiding this comment.
Thanks for taking a look @hawkw @jgallagher! I think this one is ready to go.
I don't think the possible race I found is a blocker for this one to land. We can fix that in another PR I think.
Thanks for all the details; this seems pretty gnarly. Do I understand correctly that the root cause (if this can be distilled down to one thing) is something like:
? If that's correct, it seems like it's the last bullet that's misbehaving, right? Somehow that commit needs to either fail (because it's trying to write a state based on a stale input) or make the (Also agreed this can be fixed in a separate PR.) |
jgallagher
left a comment
There was a problem hiding this comment.
Some vague feedback that I don't think is actionable on this PR and maybe isn't actionable at all: I understand agree with the decision to ignore the auto-restart policy and not set time_last_auto_restarted, but it feels a little weird that we can restart instances with a InstanceAutoRestartPolicy::Never value and not record the time we actually did auto restart something.
The policy is at least documented as "if it fails". I guess if necessary we could have a ReallyNeverNotEvenDuringUpdates variant? I'm more skittish about not recording the timestamp, although I guess we could make the same claim there (that it's really "time last auto restarted due to failure")? Reporting time_last_auto_restarted: None for an instance that we did auto restart during an update seems iffy.
There was a problem hiding this comment.
Does this need to unwind into SledEvacuating instead of NoVmm if our incoming reason was SledEvacuating?
There was a problem hiding this comment.
Makes sense so we can try to restart it, but it also introduces the possibility of a race if the user stops the instance while the saga is unwinding. I'm adding some safeguards here to handle this. Hopefully it's enough.
| // the meantime. | ||
| if !osagactx | ||
| .datastore() | ||
| .instance_update_runtime(&instance_id, &new_runtime) |
There was a problem hiding this comment.
Mostly this is a question about the other race you found (wondering if we have a similar problem here) - does this commit need to confirm the intended state of the instance hasn't changed to Stopped in the meantime? IIUC from the other race, intended state changes don't bump the internal state generation numbers, so this commit could probably go through and restart an instance that had already been successfully stopped?
There was a problem hiding this comment.
Just to keep this comment with updated information. We spoke about it IRL and yes, this could also be a race. Will be handled in an upcoming PR
There was a problem hiding this comment.
Should we tweak this to include evacuated instances? (There are similar docs in other places w.r.t. this task, like
. I don't know whether it's worth your time to go fix them all. Maybe we could remove some of them?)
Yeah, I think I agree with John here. Ideally, the update saga would be modified to allow making the |
Hmm, might we consider having two different timestamps, then? I do think it's valuable to record the time we automatically restarted an instance due to evacuation. Currently, though, the timestamp in the API response is used by the console to calculate the cooldown duration for a "the instance will be eligible to restart again in ..." when it is in the We might consider renaming the existing fields, if that would make it clearer that they specifically refer to the cooldown period for restarting failed instances?
Basically, @jgallagher, would it feel any better if it was |
| tasks.instance_watcher.period_secs = one_day; | ||
| tasks.abandoned_vmm_reaper.period_secs = one_day; | ||
| tasks.vmm_mark_stop_for_update.period_secs = one_day; | ||
| tasks.vmm_stop_for_update.period_secs = one_day; |
There was a problem hiding this comment.
take it or leave it: if the intent is to prevent these tasks from being periodically activated during the test, we might wanna make their period Duration::MAX rather than one day? the test probably won't get stuck running for an entire day, but...
We spoke about this during the update sync today and agreed in a way forward. Happy to collaborate with this, or review a PR or whatever.
I like the idea of having two timestamps. I'm not completely sold on About the That said, I think these items are for follow up PRs, or for further consideration elsewhere. I can open up issues if we think that's the best place to continue these conversations. I'd really like to get this PR onto main due to the urgency of this feature 😅 |
| // If the instance cannot be read, we set its state to `NoVmm` | ||
| // to reduce the possibility of leaving it as `Rebooting` | ||
| // indefinitely. | ||
| Err(error) => { |
There was a problem hiding this comment.
hmm, this is kinda uncomfy. the only reason this would fail IIUC is if either the instance is deleted, or if there's a transient database connection error, right? if it's deleted, we could just give up entirely, but if there's an error reading the db record, either it's transient and could be retried (allowing us to get the correct state) OR the subsequent write back to the instance state right after this will also fail, because the database is down, and then the saga will be stuck. maybe the whole thing ought to be wrapped in a retry loop so that we keep trying if we are temporarily unable to talk to CRDB, instead of guessing about the state?
| let cases = [ | ||
| Case { | ||
| reason: Reason::User, | ||
| user_stops_during_saga: false, | ||
| expected_state: nexus_db_model::InstanceState::NoVmm, | ||
| }, | ||
| Case { | ||
| reason: Reason::AutoRestart, | ||
| user_stops_during_saga: false, | ||
| expected_state: nexus_db_model::InstanceState::NoVmm, | ||
| }, | ||
| Case { | ||
| reason: Reason::AutoStart, | ||
| user_stops_during_saga: false, | ||
| expected_state: nexus_db_model::InstanceState::NoVmm, | ||
| }, | ||
| Case { | ||
| reason: Reason::SledEvacuation, | ||
| user_stops_during_saga: false, | ||
| expected_state: nexus_db_model::InstanceState::SledEvacuating, | ||
| }, | ||
| Case { | ||
| reason: Reason::SledEvacuation, | ||
| user_stops_during_saga: true, | ||
| expected_state: nexus_db_model::InstanceState::NoVmm, | ||
| }, | ||
| ]; | ||
|
|
||
| for Case { reason, user_stops_during_saga, expected_state } in cases { |
There was a problem hiding this comment.
take it or leave it, but personally, I really don't care for tests that construct a bunch of cases like this and then loop over them. If it were me, I'd much rather we do this by having a helper function that runs one Case, and then have separate test functions for each test case that call the helper function and pass in the desired input configuration. The advantages are that (1) cargo nextest will run all the tests in parallel, instead of sequentially, and (2) we can see which individual test case failed, and if one runs with --no-fail-fast, one can see that other test cases have succeeded.
| ); | ||
| return Ok(()); | ||
| } | ||
| Err(error) => return Err(into_backoff_error(error)), |
There was a problem hiding this comment.
Ug, I don't think into_backoff_error() is correct here, although through no fault of its own. into_backoff_error() returns a permanent error for anything that isn't retryable, and the only error that is retryable is ServiceUnavailable:
omicron/common/src/api/external/error.rs
Lines 208 to 224 in e5c46e9
However, database errors are turned into InternalError, not ServiceUnavailable:
omicron/nexus/db-errors/src/transaction_error.rs
Lines 225 to 228 in e5c46e9
omicron/nexus/db-errors/src/transaction_error.rs
Lines 243 to 245 in e5c46e9
That combination seems wrong - it means we don't consider database errors as retryable, which means a transient db issue here turns into a stuck saga, I think?
I don't really know what to do about all of this. Failing in an undo node is Really Bad, right?
There was a problem hiding this comment.
Ugh :(
For what it's worth, before this change, the sis_move_to_starting_undo was already returning all errors from instance_update_runtime. So in a sense this somewhat of an improvement because it's at least retrying on ServiceUnavailable?
Perhaps we can open up a separate issue to improve how db errors are reported? retryable() is used in other places, and it's more correct to have the DB to correctly report errors. As a separate PR we can change public_error_from_diesel and public_error_from_diesel_lookup to map transient diesel or cockroachdb errors to ServiceUnavailable. What do you think?
There was a problem hiding this comment.
For what it's worth, before this change, the
sis_move_to_starting_undowas already returning all errors frominstance_update_runtime
Yeah, I think that behavior was wrong, and we should almost certainly change it. I will accept that this isn't the place to do it, though.
| .nexus() | ||
| .background_tasks | ||
| .task_instance_reincarnation | ||
| .activate(); |
There was a problem hiding this comment.
Does the fact that we don't enforce the cooldown period for evacuating restarts mean this activate() could turn into a "spam reincarnations as fast as possible" if there's an instance that's failing to reincarnate? Say there's some problem with dendrite that's causing reincarnation to fail; I think we'd do something like:
- kick off instance start saga for an instance we're trying to reincarnate due to sled evacuation
- it goes through placement and constructs a VMM record on a sled with capacity
- we get to
dpd_ensure, which fails - the saga unwinds; we get here, this immediately activates the reincarnation task and we loop back around to 1
Maybe this sequence is already a problem for other instance restarts that are failing too, I'm not sure. I guess it depends on when we update time_last_auto_restarted, which would affect what can_reincarnate() returns here?
There was a problem hiding this comment.
😖 Yeah, you're right.
I think one way to mitigate this would be to change sis_move_to_starting_undo to write Failed instead of SledEvacuating if the intended state is still Running, when the restart unwinds. We can then force that instance into the cooldown period.
The caveat here, is again the auto-restart policy. If the user set it to Never it'll remain stopped, but then again I don't think that's terribly bad?
Thoughts?
There was a problem hiding this comment.
I could see cases for any of these:
- Move it to
Failed(as in [live-update] Modify instance reincarnation to account for sled evacuations #11504 (comment), this doesn't seem right but I agree the practical impact is probably pretty small) - If our
ReasonisSledEvacuating, just don't activate the bg task, and rely on its normal timer - Do Distinguish between instance cooldown after reincarnation, and time of last auto restart #11707 and then impose some nominal cooldown period based on that timestamp (this can be much shorter than 5 minutes and doesn't need to increase over time; just something to avoid this turning into a hot loop)
I think I have a mild preference for 2? It feels a little yucky and would need a sort of apologetic comment explaining it, but I think it's easy to implement and the reincarnation bg task already runs every minute, so in practice it's pretty similar to picking option 3 with a 1 minute cooldown.
There was a problem hiding this comment.
Yeah, I'm personally fine with either of 2 or 3 but 2 seems the simplest.
| nexus_state, | ||
| propolis_id: None, | ||
| generation: InstanceStateGeneration::from( | ||
| db_instance.state_generation, |
There was a problem hiding this comment.
Oof, I'm worried about yet another race here (but this one is specific to sled evacuation):
- Once we get to
sis_move_to_starting, the VMM row is in theStartingstate - If anything goes wrong later in in the saga, we'll unwind, and this undo node is supposed to put it back in the
SledEvacuatingstate, conditional on the generation number not having changed
However, what if something else marks the VMM as Failed while this saga is running? That would bump the generation number, which would prevent us from putting it back in SledEvacuating, which means an instance that we were trying to reincarnate due to sled evacuation is now stuck in Failed instead of SledEvacuating. That's maybe not the end of the world? But I'm worried there's no obvious / easy fix here - explicitly overwriting a Failed state here seems awfully precarious. Should we have modeled sled evacuation as a separate column instead of a stat?
In terms of "how could it be marked failed in between sis_move_to_starting and the end of the saga", I think either of these are viable paths:
- sled-agent fails to start the propolis zone, publishes that state to Nexus, which runs an
instance_updatesaga that marks it failed - any time we make it past
sis_ensure_registered, the instance watcher bg task could conceivably poll sled-agent for the VMM status. If we then fail aftersis_ensure_registeredbut before the end, start unwinding, if the instance-watcher polls sled agent anywhere betweensis_ensure_unregisteredand here, it'll see that the VMM is gone and mark it as failed
There was a problem hiding this comment.
However, what if something else marks the VMM as Failed while this saga is running? That would bump the generation number, which would prevent us from putting it back in SledEvacuating, which means an instance that we were trying to reincarnate due to sled evacuation is now stuck in Failed instead of SledEvacuating. That's maybe not the end of the world?
I don't think it's a huge issue, since the reincarnation task attempts to reincarnate instances in Failed state as well. There's just the caveat that if they have an auto-restart policy of Never, they won't be restarted, but then that was a conscious choice from the user no?
There'll be an added cooldown period for the Failed instances but that would only make the update take longer. So not a huge deal?
We can also open up another issue to look into this race as well as a follow up item.
There was a problem hiding this comment.
- any time we make it past
sis_ensure_registered, the instance watcher bg task could conceivably poll sled-agent for the VMM status. If we then fail aftersis_ensure_registeredbut before the end, start unwinding, if the instance-watcher polls sled agent anywhere betweensis_ensure_unregisteredand here, it'll see that the VMM is gone and mark it as failed
FWIW, this part, at least, should no longer be the case after #11696, which changes the unwinding saga to immediately change the VMM state to one that will not be polled by the instance-watcher while it is being unregistered. I think this is a bug across the board that isn't actually specific to the reincarnation changes here.
There was a problem hiding this comment.
I don't think it's a huge issue, since the reincarnation task attempts to reincarnate instances in
Failedstate as well. There's just the caveat that if they have an auto-restart policy ofNever, they won't be restarted, but then that was a conscious choice from the user no?
Yeah, I don't think this is a blocker, but I do think it's still incorrect and worth fixing at some point, if the design is that a SledEvacuating instance should continue to be reincarnated until success or it's explicitly stopped. I'm on board with filing an issue (or noting this on one of the existing ones - this is maybe just another flavor of #11706?).
karencfv
left a comment
There was a problem hiding this comment.
🤞 🤞 🤞 🤞 🤞 🤞 🤞 🤞 🤞 🤞 🤞 🤞 🤞 🤞
| ); | ||
| return Ok(()); | ||
| } | ||
| Err(error) => return Err(into_backoff_error(error)), |
There was a problem hiding this comment.
Ugh :(
For what it's worth, before this change, the sis_move_to_starting_undo was already returning all errors from instance_update_runtime. So in a sense this somewhat of an improvement because it's at least retrying on ServiceUnavailable?
Perhaps we can open up a separate issue to improve how db errors are reported? retryable() is used in other places, and it's more correct to have the DB to correctly report errors. As a separate PR we can change public_error_from_diesel and public_error_from_diesel_lookup to map transient diesel or cockroachdb errors to ServiceUnavailable. What do you think?
| nexus_state, | ||
| propolis_id: None, | ||
| generation: InstanceStateGeneration::from( | ||
| db_instance.state_generation, |
There was a problem hiding this comment.
However, what if something else marks the VMM as Failed while this saga is running? That would bump the generation number, which would prevent us from putting it back in SledEvacuating, which means an instance that we were trying to reincarnate due to sled evacuation is now stuck in Failed instead of SledEvacuating. That's maybe not the end of the world?
I don't think it's a huge issue, since the reincarnation task attempts to reincarnate instances in Failed state as well. There's just the caveat that if they have an auto-restart policy of Never, they won't be restarted, but then that was a conscious choice from the user no?
There'll be an added cooldown period for the Failed instances but that would only make the update take longer. So not a huge deal?
We can also open up another issue to look into this race as well as a follow up item.
jgallagher
left a comment
There was a problem hiding this comment.
Thanks for all the intricate work here. The only blocker left IMO is #11504 (comment), and I'm happy to go ahead and approve assuming we take either option 1 or 2 (or some variant of them) - if that turns out to be more complicated than it seems and you want another review to check that, happy to do so.
hawkw
left a comment
There was a problem hiding this comment.
I'm with @jgallagher, and I'll be happy seeing this merge once #11504 (comment) is addressed. I suggested a few minor edits to typos in the comments and a line I'd like to see wrapped, but nothing else blocking besides the issue John mentioned!
Thanks for all your hard work on this, I know it's been a slog!
| /// The wall-clock time at which the cooldown period will expire and the | ||
| /// instance will once again be eligible to reincarnate, if the instance | ||
| /// is still cooling down. |
There was a problem hiding this comment.
EXTREMELY nitpicky, take it or leave it: personally, I prefer to include a verb in comments like this, because describing the function as though it was a noun feels kind of like a sentence fragment to me:
| /// The wall-clock time at which the cooldown period will expire and the | |
| /// instance will once again be eligible to reincarnate, if the instance | |
| /// is still cooling down. | |
| /// Returns the wall-clock time at which the cooldown period will expire and | |
| /// the instance will once again be eligible to reincarnate, if the instance | |
| /// is still cooling down. |
| .eq(IntendedState::Running) | ||
| // Either the failed-instance predicate from above matches, *or* | ||
| // the instance is rebooting due to its sled evacuating. When an | ||
| // instance had to stop for sled evacuation, can always be |
There was a problem hiding this comment.
nit:
| // instance had to stop for sled evacuation, can always be | |
| // instance had to stop for sled evacuation, it can always be |
| // reincarnated, regardless of its auto-restart policy and when it | ||
| // last reincarnated. |
There was a problem hiding this comment.
tiny nit: perhaps it's worth having a TODO referencing #11708 here?
| const ALL: [Self; 3] = | ||
| [Self::NeverRestarted, Self::WithinCooldown, Self::CooldownElapsed]; |
There was a problem hiding this comment.
nit, take it or leave it: if we generated this by using #[derive(strum::VariantsArray)] on the enum, the generated array would always include all the enum's variants, even if some are added later. not a big deal here but it feels slightly more misuse-resistant in general...
| "unexpected reincarnability: {found_reincarnability:?} for instance state: {state:?}, restart policy: \ | ||
| {policy:?}, last auto-restart time: {last_auto_restart:?}", |
There was a problem hiding this comment.
can we wrap this at the 80th column?
Introduces a new
ReincarnationReason::SledEvacuationreason, and adapts the instance reincarnation background task to account for this new variant. Something to note is that we are explicitly overriding the auto-restart policy to "best effort" for all instances, this is because the API documentation for this setting explicitly says:These instances haven't actually failed, so we don't take that setting into account.
Depends on: #11491
Related: #11169